import request from '@/utils/request'

export function login(username, password, code, uuid, clientId) {
    return request({
        url: 'auth/login',
        method: 'post',
        data: {
            username,
            password,
            code,
            uuid,
            clientId
        }
    })
}

export function getInfo() {
    return request({
        url: 'auth/info',
        method: 'get'
    })
}

export function getCodeImg() {
    return request({
        url: 'auth/vCode',
        method: 'get'
    })
}

export function logout() {
    return request({
        url: 'auth/logout',
        method: 'delete'
    })
}

export function getScanCode() {
    return request({
        url: 'auth/scan-code',
        method: 'get'
    })
}

export   function getScanResult(code) {
    return request({
        url: 'auth/scan-result',
        method: 'get',
        params: {
            code: code
        }
    })
}
